package ynu.edu.online_course.mapper;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Options;
import ynu.edu.online_course.entity.TypeModified;

@Mapper
public interface TypeModifiedMapper {

    @Insert("INSERT INTO type_modified (be_modified,type_name_before, type_name_after, modified_by, modified_at) " +
            "VALUES (#{courseType.id}, #{typeNameBefore}, #{modifiedAfter}, #{modifiedBy.id},#{modifiedAt})")
    @Options(useGeneratedKeys = true, keyProperty = "id", keyColumn = "id")
    int insertTypeModifiedRecord(TypeModified typeModified);
}
